<div class="modal-header" id="scope">
	<h3 class="modal-title" ng-if="param.type == 'insert'">新增</h3>
	<h3 class="modal-title" ng-if="param.type == 'update'">修改</h3>
</div>
<div class="modal-body">
	<form name="myForm" class="form-horizontal form-validation">
		<div class="panel panel-default">
			<div class="panel-body">
				<div class="form-group" >
					<label class="col-sm-3 control-label">当前线路：</label>
					<div class="col-sm-7">
					   <p ng-repeat="each in stationList" ng-show="stationList!=''">
						  <span class="start" ng-if="each.type==1">起</span>
						  <span class="up" ng-if="each.type==2&&!each.destination">上</span>
						  <span class="down" ng-if="each.type==2&&each.destination">下</span>
						  <span class="terminal" ng-if="each.type==3">终</span> &nbsp &nbsp &nbsp
						  {{each.station.city}} &nbsp {{each.station.address}}  &nbsp
					   </p>
					   <p ng-show="stationList==''" style="margin-top: 7px">请选择线路！</p>
					</div>
				</div>
				<div class="form-group" ng-if="param.type == 'update'">
					<label class="col-sm-3 control-label">批次号：</label>
					<div class="col-sm-5">
						<input type="text" class="form-control"
							ng-model="param.data.batchNo" readonly="readonly" required />
					</div>
				</div>
				<div class="form-group" ng-if="param.type == 'update'">
					<label class="col-sm-3 control-label">班次号：</label>
					<div class="col-sm-5">
						<input type="text" class="form-control"
							ng-model="param.data.shiftNo" readonly="readonly" required />
					</div>
				</div>
				<div class="form-group" ng-if="param.type == 'update'">
					<label class="col-sm-3 control-label">线路名：</label>
					<div class="col-sm-5">
						<input type="text" class="form-control"
							ng-model="param.data.route.name" readonly="readonly" required />
					</div>
				</div>
<!--				<div class="form-group" ng-if="param.type == 'update'">
					<label class="col-sm-3 control-label">类型：</label>
					<div class="col-sm-5">
						<input type="text" class="form-control"
							ng-model="shiftType" readonly="readonly" required />
					</div>
				</div>	-->
				<div class="form-group" ng-if="param.type == 'insert'">
					<label class="col-sm-3 control-label"><span
						style="color: red; text-align: center;">* &nbsp</span>线路选择：</label>
					<div class="col-sm-5">
						<ui-select ng-model="routelist.selected" theme="bootstrap">
						<ui-select-match placeholder="线路选择">{{$select.selected.name}}</ui-select-match>
						<ui-select-choices
							repeat="route in routelist | propsFilter:{name: $select.search}">
						<span ng-bind-html="route.name | highlight: $select.search"></span>
						</ui-select-choices> </ui-select>
					</div>
					<p>必填。</p>
				</div>
				<div class="form-group" ng-show="code!= '200'">
					<label class="col-sm-3 control-label"><span
						style="color: red; text-align: center;">* &nbsp</span>基础价格：</label>
					<div class="col-sm-5">
						<input type="text" class="form-control" placeholder="基础价格"
							readonly="true" ng-model="priceType" />
					</div>
					<p>
						<button class="btn m-b-xs btn-sm btn-default btn-addon"
							type="button" ng-click="add()">
							<i class="fa fa-plus"></i> 添加价格
						</button>
					</p>
				</div>
				<div class="form-group" ng-show="code=='200'">
					<label class="col-sm-3 control-label"><span
						style="color: red; text-align: center;">* &nbsp</span>基础价格：</label>
					<div class="col-sm-5">
						<input type="text" class="form-control" placeholder="基础价格"
							readonly="true" ng-model="priceType" />
					</div>
					<p>
						<button class="btn m-b-xs btn-sm btn-default btn-addon"
							type="button" ng-click="update()">
							<i class="fa fa-pencil fa-fw m-r-xs"></i> 修改价格
						</button>
					</p>
				</div>
 				<div class="form-group" ng-show="code=='200'">
					<label class="col-sm-3 control-label">提示：</label>
					<div class="col-sm-7">
						 <p  style="color: red;" >1.基础价格、状态、车票数修改后会影响已生成的班次计划。</p>
						 <p  style="color: red;" >2.提交时可自行勾选影响的班次计划。</p>
					</div>
				</div>
				<div class="form-group">
					<label class="col-sm-3 control-label">
						<span style="color: red; text-align: center;">* &nbsp</span>状态：</label>
					<div class="col-sm-5">
						<ui-select ng-model="statusList.selected" theme="bootstrap">
						<ui-select-match placeholder="状态选择">{{$select.selected.name}}</ui-select-match>
						<ui-select-choices repeat="status in statusList | propsFilter:{name: $select.search}">
						<span ng-bind-html="status.name | highlight: $select.search"></span>
						</ui-select-choices> </ui-select>
					</div>
					<p>状态为正常才可以生成班次计划。</p>
				</div>
				<div class="form-group" ng-if="param.type == 'insert'">
					<label class="col-sm-3 control-label" ><span
						style="color: red; text-align: center;">* &nbsp</span>类型：</label>
					<div class="col-sm-5">
						<ui-select ng-model="typeList.selected" theme="bootstrap">
						<ui-select-match placeholder="类型选择">{{$select.selected.name}}</ui-select-match>
						<ui-select-choices repeat="type in typeList | propsFilter:{name: $select.search}">
						<span ng-bind-html="type.name | highlight: $select.search"></span>
						</ui-select-choices> </ui-select>
					</div>
				</div>
				<div class="form-group" ng-if="typeList.selected.id==2">
					<label class="col-sm-3 control-label"><span
						style="color: red; text-align: center;">* &nbsp</span>密集班间隔时间：</label>
					<div class="col-sm-5">
						<div class="input-group">
							<input type="text" class="form-control" placeholder="密集班间隔时间"
								ng-model="param.data.intervalTime" ng-pattern="/^[0-9]*$/"
								required /> <span class="input-group-addon">分钟</span>
						</div>
					</div>
					<p>密集班必填。</p>
				</div>
				<div class="form-group" >
					<label class="col-sm-3 control-label"><span
							style="color: red; text-align: center;">* &nbsp</span>开班时间：</label>
					<div class="col-sm-5">
						<input type="text" class="form-control" placeholder="00:00:00"
							   ng-model="param.data.startTime"
							   ng-pattern="/^([0-1]?[0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$/"
							   required />
					</div>
					<p>必填，格式为：00:00:00</p>
				</div>
				<div class="form-group" ng-if="typeList.selected.id==2">
					<label class="col-sm-3 control-label"><span
							style="color: red; text-align: center;">* &nbsp</span>收班时间：</label>
					<div class="col-sm-5">
						<input type="text" class="form-control" placeholder="00:00:00"
							   ng-model="param.data.endTime"
							   ng-pattern="/^([0-1]?[0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$/"
							   required />
					</div>
					<p>密集班必填，格式为：00:00:00</p>
				</div>
				<div class="form-group" >
					<label class="col-sm-3 control-label"><span
						style="color: red; text-align: center;">* &nbsp</span>间隔天数：</label>
					<div class="col-sm-5">
						<input type="text" class="form-control" ng-maxlength="3"
							placeholder="间隔天数" ng-model="param.data.intervalDay"
							ng-pattern="/^[0-9]*$/" required />
					</div>
				</div>
				<div class="form-group" >
					<label class="col-sm-3 control-label"><span
						style="color: red; text-align: center;">* &nbsp</span>车票数：</label>
					<div class="col-sm-5">
						<input type="text" class="form-control" ng-maxlength="3"
							placeholder="车票数" ng-model="param.data.tickets"
							ng-pattern="/^[0-9]*$/" required />
					</div>
				</div>
<!-- 				<div class="form-group">
					<label class="col-sm-3 control-label"> <span
						style="color: red; text-align: center;">* &nbsp</span>是否临时班次：
					</label>
					<div class="col-sm-4">
						<label class="i-switch m-t-xs m-r bg-info"> <input
							type="checkbox" name="disabled" ng-model="param.data.temporary"
							ng-checked="param.data.temporary==true"> <i></i>
						</label>
					</div>
				</div> -->
				<div class="form-group">
					<label class="col-sm-3 control-label"><span
						style="color: red; text-align: center;">* &nbsp</span>所属单位：</label>
					<div class="col-sm-5">
						<ui-select ng-model="orglist.selected" theme="bootstrap">
						<ui-select-match placeholder="所属组织">{{$select.selected.name}}</ui-select-match>
						<ui-select-choices
							repeat="org in orglist | propsFilter:{name: $select.search}">
						<span ng-bind-html="org.name | highlight: $select.search"></span>
						</ui-select-choices> </ui-select>
					</div>
					<p>车辆所属的单位选择。</p>
				</div>
			</div>
			<footer class="panel-footer text-right bg-light lter">
				<button class="btn btn-default" type="button" ng-click="cancel()">取消</button>
				<button type="submit" class="btn btn-success" ng-click="ok()">提交</button>
			</footer>
		</div>
	</form>
</div>
<style>
.start {
	width: 2.6rem;
	height: 2.6rem;
	line-height: 2.6rem;
	background-color: #49AAE6;
	color: #fff;
	border-radius: 50%;
	display: inline-block;
	text-align: center;
	font-size: 1.3rem;
}

.terminal {
	width: 2.6rem;
	height: 2.6rem;
	line-height: 2.6rem;
	background-color: #70D7C6;
	color: #fff;
	border-radius: 50%;
	display: inline-block;
	text-align: center;
	font-size: 1.3rem;
}

.up {
	width: 2.6rem;
	height: 2.6rem;
	line-height: 2.6rem;
	background-color: #9AD0F1;
	color: #fff;
	border-radius: 50%;
	display: inline-block;
	text-align: center;
	font-size: 1.3rem;
}
.down{
	width: 2.6rem;
	height: 2.6rem;
	line-height: 2.6rem;
	background-color: #BDECE3;
	color: #fff;
	border-radius: 50%;
	display: inline-block;
	text-align: center;
	font-size: 1.3rem;
}
</style>